<template>
  <div class="auto" style="margin-top: 5px">
    <criteria-paged :model="model" v-ref:paged>
      <criteria partial='criteria' @condition-changed='search' v-ref:cri>
        <div novalidate class="form-inline"style="height:30px" partial>
          <div class="form-group">
            <input  type="text" class="form-control" v-model="model.f_brand" placeholder='品牌'
                    condition="u.f_brand = '{}'"
                    :size="model.f_brand ? model.f_brand.length : 5">
          </div>
          <div class="form-group">
            <input  type="text" class="form-control" v-model="model.f_model_name" placeholder='型号'
                    condition="u.f_model_name = '{}'"
                    :size="model.f_model_name ? model.f_model_name.length : 5">
          </div>
          <div class="form-group">
            <input  type="text" class="form-control" v-model="model.f_ware_operator" placeholder='操作人'
                    condition="u.f_ware_operator = '{}'"
                    :size="model.f_ware_operator ? model.f_ware_operator.length : 5">
          </div>
          <div class="form-group">
            <input  type="text" class="form-control" v-model="model.f_ware_date" placeholder='操作时间'
                    condition="u.f_ware_date = '{}'"
                    :size="model.f_ware_date ? model.f_ware_date.length : 5">
          </div>
          <div class="form-group">
            <input  type="text" class="form-control" v-model="model.f_storehouse" placeholder='仓库号'
                    condition="u.f_ware_date = '{}'"
                    :size="model.f_storehouse ? model.f_storehouse.length : 5">
          </div>
          <button class="btn btn-success width-80" @click="search()">查询</button>
          <button class="btn btn-default width-80" @click="clean()">清空查询</button>
          <button class="btn btn-success width-80" @click="exports()">导出EXCEL</button>
        </div>
      </criteria>
      <data-grid :model='model'style="border:20px" partial='list' v-ref:grid>
        <template partial='head'>
          <tr>
            <th>序号</th>
            <th>操作时间</th>
            <th>品牌</th>
            <th>型号</th>
            <th>数量</th>
            <th>状态</th>
            <th>操作人</th>
            <th>仓库号</th>
            <th>操作</th>
          </tr>
        </template>
        <template partial='body'>
          <td style="text-align: center;">{{$index+1}}</td>
          <td style="text-align: center;">{{row.f_ware_date}}</td>
          <td style="text-align: center;">{{row.f_brand}}</td>
          <td style="text-align: center;">{{row.f_model_name}}</td>
          <td style="text-align: center;">{{row.f_quantity}}</td>
          <td style="text-align: center;">{{row.f_status}}</td>
          <td style="text-align: center;">{{row.f_storehouse}}</td>
          <td style="text-align: center;"></td>
        </template>
      </data-grid>
    </criteria-paged>
  </div>
</template>

<script>
  export default {
    name: "sale-record"
  }
</script>

<style scoped>

</style>
